import {createRouter, createWebHashHistory} from "vue-router";
import Layout from '@/components/Layout.vue'

const routes = [
    {
        path: '/login',
        name: '登录',
        component: () => import('@/views/Login.vue'),
    },
    {
        path: '/',
        component: Layout,
        children: [
            {
                path: '/home',
                name: '大屏',
                component: () => import('@/views/Dashboard.vue'),
            },
            {
                path: '/settings',
                name: '设置',
                children: [
                    {
                        path: '/settings/system',
                        name: '系统设置',
                        component: () => import('@/views/Settings.vue'),
                    },
                ]
            },
            {
                path: '/users',
                name: '用户设置',
                children: [
                    {
                        path: '/users/list',
                        name: '用户列表',
                        component: () => import('@/views/Users.vue'),
                    },
                ]
            }
        ],
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});
export default router;